const main = {
  add: `INSERT INTO User
    (familyName, lastName, uAvatar, gender) VALUES
    (?, ?, ?, ?)`,
  update: `UPDATE User SET
    familyName = ?,
    lastName = ?,
    gender = ?
    WHERE id = ?`,
  updateAvatar: `UPDATE User SET
    uAvatar = ?
    WHERE id = ?`,
  
  selectUser: `SELECT * FROM User WHERE id = ?`,
  selectFullUserInfo: `SELECT u.*, i.*, a.adminType, 
    a.tel, a.email, c.*
    FROM User u
    LEFT JOIN UserInfo i ON i.id = u.id
    LEFT JOIN UserAccount a ON a.id = u.id
    LEFT JOIN CompanyAuthorize c ON c.id = u.id
    WHERE u.id = ?`
};

module.exports = main;